package resource;

public class Student implements Comparable{
	String name;
	int score;
	public Student(String name,int score){
		this.name=name;
		this.score=score;
	}
	@Override
	public int compareTo(Object o){
		Student s=(Student)o;
		if(this.score>s.score){
			return 1;
		}else if(this.score<s.score){
			return -1;
		}else {
		return this.name.compareTo(s.name);
		}
	}
	public String toString(){
		return "name:"+name+"	score:"+score;
	}
 	
}
